<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>测试报告</title>
    <meta name="generator" content="HTMLTestRunner 0.8.2.2"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    
<style type="text/css" media="screen">
body        { font-family: Microsoft YaHei,Tahoma,arial,helvetica,sans-serif;padding: 20px; font-size: 120%; }
table       { font-size: 100%; }
/* -- heading ---------------------------------------------------------------------- */
.heading {
    margin-top: 0ex;
    margin-bottom: 1ex;
}
.heading .description {
    margin-top: 4ex;
    margin-bottom: 6ex;
}
/* -- report ------------------------------------------------------------------------ */
#total_row  { font-weight: bold; }
.passCase   { color: #5cb85c; }
.failCase   { color: #d9534f; font-weight: bold; }
.errorCase  { color: #f0ad4e; font-weight: bold; }
.hiddenRow  { display: none; }
.testcase   { margin-left: 2em; }
</style>

</head>
<body >
<script language="javascript" type="text/javascript">
output_list = Array();
/*level 调整增加只显示通过用例的分类 --Findyou
0:Summary //all hiddenRow
1:Failed  //pt hiddenRow, ft none
2:Pass    //pt none, ft hiddenRow
3:All     //pt none, ft none
*/
function showCase(level) {
    trs = document.getElementsByTagName("tr");
    for (var i = 0; i < trs.length; i++) {
        tr = trs[i];
        id = tr.id;
        if (id.substr(0,2) == 'ft') {
            if (level == 2 || level == 0 ) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
        if (id.substr(0,2) == 'pt') {
            if (level < 2) {
                tr.className = 'hiddenRow';
            }
            else {
                tr.className = '';
            }
        }
    }
    //加入【详细】切换文字变化 --Findyou
    detail_class=document.getElementsByClassName('detail');
	//console.log(detail_class.length)
	if (level == 3) {
		for (var i = 0; i < detail_class.length; i++){
			detail_class[i].innerHTML="收起"
		}
	}
	else{
			for (var i = 0; i < detail_class.length; i++){
			detail_class[i].innerHTML="详细"
		}
	}
}
function showClassDetail(cid, count) {
    var id_list = Array(count);
    var toHide = 1;
    for (var i = 0; i < count; i++) {
        //ID修改 点 为 下划线 -Findyou
        tid0 = 't' + cid.substr(1) + '_' + (i+1);
        tid = 'f' + tid0;
        tr = document.getElementById(tid);
        if (!tr) {
            tid = 'p' + tid0;
            tr = document.getElementById(tid);
        }
        id_list[i] = tid;
        if (tr.className) {
            toHide = 0;
        }
    }
    for (var i = 0; i < count; i++) {
        tid = id_list[i];
        //修改点击无法收起的BUG，加入【详细】切换文字变化 --Findyou
        if (toHide) {
            document.getElementById(tid).className = 'hiddenRow';
            document.getElementById(cid).innerText = "详细"
        }
        else {
            document.getElementById(tid).className = '';
            document.getElementById(cid).innerText = "收起"
        }
    }
}
function html_escape(s) {
    s = s.replace(/&/g,'&amp;');
    s = s.replace(/</g,'&lt;');
    s = s.replace(/>/g,'&gt;');
    return s;
}
</script>
<div class='heading'>
<h1 style="font-family: Microsoft YaHei">测试报告</h1>
<p class='attribute'><strong>测试人员 : </strong> 陈勇志</p>
<p class='attribute'><strong>开始时间 : </strong> 2020-07-13 17:25:44</p>
<p class='attribute'><strong>合计耗时 : </strong> 0:00:00.411897</p>
<p class='attribute'><strong>测试结果 : </strong> 共 3，通过 2，失败 1，通过率= 66.67%</p>

<p class='description'>接口自动化测试</p>
</div>


<p id='show_detail_line'>
<a class="btn btn-primary" href='javascript:showCase(0)'>概要{ 66.67% }</a>
<a class="btn btn-danger" href='javascript:showCase(1)'>失败{ 1 }</a>
<a class="btn btn-success" href='javascript:showCase(2)'>通过{ 2 }</a>
<a class="btn btn-info" href='javascript:showCase(3)'>所有{ 3 }</a>
</p>
<table id='result_table' class="table table-condensed table-bordered table-hover">
<colgroup>
<col align='left' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
<col align='right' />
</colgroup>
<tr id='header_row' class="text-center success" style="font-weight: bold;font-size: 16px;">
    <td>用例集/测试用例</td>
    <td>总计</td>
    <td>通过</td>
    <td>失败</td>
    <td>错误</td>
    <td>详细</td>
</tr>

<tr class='failClass warning'>
    <td>test_api.TestProjectApi</td>
    <td class="text-center">3</td>
    <td class="text-center">2</td>
    <td class="text-center">1</td>
    <td class="text-center">0</td>
    <td class="text-center"><a href="javascript:showClassDetail('c1',3)" class="detail" id='c1'>详细</a></td>
</tr>

<tr id='pt1_1' class='hiddenRow'>
    <td class='passCase'><div class='testcase'>test_project_api_1_石家庄片区经理登录_</div></td>
    <td colspan='5' align='center'>
    <!--默认收起错误信息 -Findyou
    <button id='btn_pt1_1' type="button"  class="btn btn-danger btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_1'>通过</button>
    <div id='div_pt1_1' class="collapse">  -->
    <!-- 默认展开错误信息 -Findyou -->
    <button id='btn_pt1_1' type="button"  class="btn btn-danger btn-xs" data-toggle="collapse" data-target='#div_pt1_1'>通过</button>
    <div id='div_pt1_1' class="collapse in" align="left">
    <pre>
    
pt1_1: &lt;class 'str'&gt;
|| 正则表达式"token":"(.*?)"
|| 正则值['token']
||关联字典 :{'cookies': None, '${random_data}': '2020-09-06', '${token_1}': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdWJqZWN0IiwidXNlcl9jb2RlIjoiMjAxOTExMDQwMDMiLCJ1c2VyX25hbWUiOiLmrrXmma7nkZ5f55-z5a625bqE5Yy65Z-fIiwianRpIjoiYTgzMWI0NGMtYWUzZC00NGY5LWExMzQtZTcwOWZjMzQ0NmIxIiwiaWF0IjoxNTk0NjMyMzQ0LCJleHAiOjE1OTQ3MTg3NDR9.mFziUADAdnmMe_2DIX2597cpNh5zaLEcyd1NSYiRQqYPP6D49frDpNSYRhCVcg9kJk7nLOT3bescwx7DB3NKOg', '${orgCode}': '0000'}
||请求头 :{'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/json'}
||请求参数 :{"userCode":20191104003,"userName":"段普瑞_石家庄区域"}
||请求 URL :https://market-investigate.kt3.pagoda.com.cn/market/v1/api/common/loginxx
||接口响应 :{"data":{"token":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdWJqZWN0IiwidXNlcl9jb2RlIjoiMjAxOTExMDQwMDMiLCJ1c2VyX25hbWUiOiLmrrXmma7nkZ5f55-z5a625bqE5Yy65Z-fIiwianRpIjoiYTgzMWI0NGMtYWUzZC00NGY5LWExMzQtZTcwOWZjMzQ0NmIxIiwiaWF0IjoxNTk0NjMyMzQ0LCJleHAiOjE1OTQ3MTg3NDR9.mFziUADAdnmMe_2DIX2597cpNh5zaLEcyd1NSYiRQqYPP6D49frDpNSYRhCVcg9kJk7nLOT3bescwx7DB3NKOg","user":{"userCode":"20191104003","userName":"段普瑞_石家庄区域"},"org":[{"level":1,"code":"0000","name":"百果园集团"},{"level":2,"code":"cdpszx","name":"成都区"},{"level":2,"code":"cqpszx","name":"重庆区"},{"level":2,"code":"fzpszxv","name":"福州区"},{"level":2,"code":"hfpszxv","name":"合肥区"},{"level":2,"code":"nbpszx","name":"宁波区"},{"level":2,"code":"nnpszxv","name":"南宁区"},{"level":2,"code":"sjpszv","name":"石家庄区"},{"level":2,"code":"szpszx","name":"深圳区"},{"level":2,"code":"typszxv","name":"太原区"},{"level":2,"code":"xapszxv","name":"西安区"},{"level":5,"code":"0216","name":"深圳南山区常丰花园店"}]},"msg":"操作成功!","status":200}
||响应时间 :0.249901
||预期结果 :{"msg":"操作成功!","status":200}
||测试结果 :PASS


    </pre>
    </div>
    </td>
</tr>

<tr id='ft1_2' class='none'>
    <td class='failCase'><div class='testcase'>test_project_api_2_创建竟对_石家庄创建竟对</div></td>
    <td colspan='5' align='center'>
    <!--默认收起错误信息 -Findyou
    <button id='btn_ft1_2' type="button"  class="btn btn-danger btn-xs collapsed" data-toggle="collapse" data-target='#div_ft1_2'>失败</button>
    <div id='div_ft1_2' class="collapse">  -->
    <!-- 默认展开错误信息 -Findyou -->
    <button id='btn_ft1_2' type="button"  class="btn btn-danger btn-xs" data-toggle="collapse" data-target='#div_ft1_2'>失败</button>
    <div id='div_ft1_2' class="collapse in" align="left">
    <pre>
    
ft1_2: 需要替换的参数key在关联参数表中查询不到。。。。
&lt;class 'str'&gt;
|| 正则表达式
|| 正则值
||关联字典 :{'cookies': None, '${random_data}': '2020-09-06', '${token_1}': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdWJqZWN0IiwidXNlcl9jb2RlIjoiMjAxOTExMDQwMDMiLCJ1c2VyX25hbWUiOiLmrrXmma7nkZ5f55-z5a625bqE5Yy65Z-fIiwianRpIjoiYTgzMWI0NGMtYWUzZC00NGY5LWExMzQtZTcwOWZjMzQ0NmIxIiwiaWF0IjoxNTk0NjMyMzQ0LCJleHAiOjE1OTQ3MTg3NDR9.mFziUADAdnmMe_2DIX2597cpNh5zaLEcyd1NSYiRQqYPP6D49frDpNSYRhCVcg9kJk7nLOT3bescwx7DB3NKOg', '${orgCode}': '0000', '': None}
||请求头 :{'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdWJqZWN0IiwidXNlcl9jb2RlIjoiMjAxOTExMDQwMDMiLCJ1c2VyX25hbWUiOiLmrrXmma7nkZ5f55-z5a625bqE5Yy65Z-fIiwianRpIjoiYTgzMWI0NGMtYWUzZC00NGY5LWExMzQtZTcwOWZjMzQ0NmIxIiwiaWF0IjoxNTk0NjMyMzQ0LCJleHAiOjE1OTQ3MTg3NDR9.mFziUADAdnmMe_2DIX2597cpNh5zaLEcyd1NSYiRQqYPP6D49frDpNSYRhCVcg9kJk7nLOT3bescwx7DB3NKOg', 'Content-Length': '959'}
||请求参数 :{"competitorsName":"${段普瑞_石家庄区域}创建竞对","competitorsDetailAddr":"广东省深圳市龙华区民治街道乐溪公寓民乐科技园","competitorsArea":1,"competitorsLevel":1,"competitorsType":1,"brandName":"其它品牌,随意填写","brandId":1,"orgCode":"${orgCode}","relevanceOrg":"","orgName":"","belongOrgName":"石家庄_张亮","belongOrgCode":"0203110002","relevanceOrgName":"","status":"","version":0,"coordinates":{"lng":514.0589,"lat":22.601307},"competitorsMapAddr":"广东省深圳市龙华区民治街道乐溪公寓民乐科技园","competitorsProvinces":"广东省","competitorsCity":"深圳市","competitorsDistrict":"龙华区","distance":0}
||请求 URL :https://market-investigate.kt3.pagoda.com.cn/market/v1/api/researchReportManager/createCompetitorsInfo
||接口响应 :{"msg":"您的机构权限不足","status":406}
||响应时间 :0.059216
||预期结果 :{"status":200,"msg":"操作成功!"}
||测试结果 :FAULT
Traceback (most recent call last):
  File "D:\Python38-32\lib\site-packages\ddt.py", line 192, in wrapper
    return func(self, *args, **kwargs)
  File "D:\ApiTestPlatform\test_paltform\tools\test_api.py", line 70, in test_project_api
    raise e
  File "D:\ApiTestPlatform\test_paltform\tools\test_api.py", line 66, in test_project_api
    self.assertTrue(AssertDict().AssertValue(json.loads(expected_result), res.json()), True)
AssertionError: 0 is not true : True


    </pre>
    </div>
    </td>
</tr>

<tr id='pt1_3' class='hiddenRow'>
    <td class='passCase'><div class='testcase'>test_project_api_3_获取我的页面_</div></td>
    <td colspan='5' align='center'>
    <!--默认收起错误信息 -Findyou
    <button id='btn_pt1_3' type="button"  class="btn btn-danger btn-xs collapsed" data-toggle="collapse" data-target='#div_pt1_3'>通过</button>
    <div id='div_pt1_3' class="collapse">  -->
    <!-- 默认展开错误信息 -Findyou -->
    <button id='btn_pt1_3' type="button"  class="btn btn-danger btn-xs" data-toggle="collapse" data-target='#div_pt1_3'>通过</button>
    <div id='div_pt1_3' class="collapse in" align="left">
    <pre>
    
pt1_3: &lt;class 'str'&gt;
|| 正则表达式
|| 正则值
||关联字典 :{'cookies': None, '${random_data}': '2020-09-06', '${token_1}': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdWJqZWN0IiwidXNlcl9jb2RlIjoiMjAxOTExMDQwMDMiLCJ1c2VyX25hbWUiOiLmrrXmma7nkZ5f55-z5a625bqE5Yy65Z-fIiwianRpIjoiYTgzMWI0NGMtYWUzZC00NGY5LWExMzQtZTcwOWZjMzQ0NmIxIiwiaWF0IjoxNTk0NjMyMzQ0LCJleHAiOjE1OTQ3MTg3NDR9.mFziUADAdnmMe_2DIX2597cpNh5zaLEcyd1NSYiRQqYPP6D49frDpNSYRhCVcg9kJk7nLOT3bescwx7DB3NKOg', '${orgCode}': '0000', '': None}
||请求头 :{'User-Agent': 'python-requests/2.23.0', 'Accept-Encoding': 'gzip, deflate', 'accept': 'application/json', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'Authorization': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJzdWJqZWN0IiwidXNlcl9jb2RlIjoiMjAxOTExMDQwMDMiLCJ1c2VyX25hbWUiOiLmrrXmma7nkZ5f55-z5a625bqE5Yy65Z-fIiwianRpIjoiYTgzMWI0NGMtYWUzZC00NGY5LWExMzQtZTcwOWZjMzQ0NmIxIiwiaWF0IjoxNTk0NjMyMzQ0LCJleHAiOjE1OTQ3MTg3NDR9.mFziUADAdnmMe_2DIX2597cpNh5zaLEcyd1NSYiRQqYPP6D49frDpNSYRhCVcg9kJk7nLOT3bescwx7DB3NKOg'}
||请求参数 :{"orgCode":"0000"}
||请求 URL :https://market-investigate.kt3.pagoda.com.cn/market/v1/api/researchReportManager/checkOLdCompetitors
||接口响应 :{"data":{"haveCompetitorsAddr":0},"msg":"操作成功!","status":200}
||响应时间 :0.062062
||预期结果 :{"status":200,"msg":"操作成功!"}
||测试结果 :PASS


    </pre>
    </div>
    </td>
</tr>

<tr id='total_row' class="text-center active">
    <td>总计</td>
    <td>3</td>
    <td>2</td>
    <td>1</td>
    <td>0</td>
    <td>通过率：66.67%</td>
</tr>
</table>

<div id='ending'>&nbsp;</div>
    <div style=" position:fixed;right:50px; bottom:30px; width:20px; height:20px;cursor:pointer">
    <a href="#"><span class="glyphicon glyphicon-eject" style = "font-size:30px;" aria-hidden="true">
    </span></a></div>
    
</body>
</html>
